import { onUnmounted } from 'vue';


export const useWindowResize = (fn: () => void) => {

    window.addEventListener('resize', fn);

    onUnmounted(() => {
        window.removeEventListener('resize', fn);
    });
}